/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package de.hwrberlin.remo.model.util;

import de.hwrberlin.remo.model.*;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;

/**
 * <!-- begin-user-doc -->
 * The <b>Switch</b> for the model's inheritance hierarchy.
 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
 * to invoke the <code>caseXXX</code> method for each class of the model,
 * starting with the actual class of the object
 * and proceeding up the inheritance hierarchy
 * until a non-null result is returned,
 * which is the result of the switch.
 * <!-- end-user-doc -->
 * @see de.hwrberlin.remo.model.RemoModelPackage
 * @generated
 */
public class RemoModelSwitch<T> extends Switch<T> {
	/**
	 * The cached model package
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static RemoModelPackage modelPackage;

	/**
	 * Creates an instance of the switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public RemoModelSwitch() {
		if (modelPackage == null) {
			modelPackage = RemoModelPackage.eINSTANCE;
		}
	}

	/**
	 * Checks whether this is a switch for the given package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @parameter ePackage the package in question.
	 * @return whether this is a switch for the given package.
	 * @generated
	 */
	@Override
	protected boolean isSwitchFor(EPackage ePackage) {
		return ePackage == modelPackage;
	}

	/**
	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated
	 */
	@Override
	protected T doSwitch(int classifierID, EObject theEObject) {
		switch (classifierID) {
			case RemoModelPackage.REMO_OBJECT: {
				RemoObject remoObject = (RemoObject)theEObject;
				T result = caseRemoObject(remoObject);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case RemoModelPackage.KNOWLEDGE_BASE: {
				KnowledgeBase knowledgeBase = (KnowledgeBase)theEObject;
				T result = caseKnowledgeBase(knowledgeBase);
				if (result == null) result = caseRemoObject(knowledgeBase);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case RemoModelPackage.KNOWLEDGE_BASE_ELEMENT: {
				KnowledgeBaseElement knowledgeBaseElement = (KnowledgeBaseElement)theEObject;
				T result = caseKnowledgeBaseElement(knowledgeBaseElement);
				if (result == null) result = caseRemoObject(knowledgeBaseElement);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case RemoModelPackage.FACT: {
				Fact fact = (Fact)theEObject;
				T result = caseFact(fact);
				if (result == null) result = caseKnowledgeBaseElement(fact);
				if (result == null) result = caseRemoObject(fact);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case RemoModelPackage.BOOLEAN_FACT: {
				BooleanFact booleanFact = (BooleanFact)theEObject;
				T result = caseBooleanFact(booleanFact);
				if (result == null) result = caseFact(booleanFact);
				if (result == null) result = caseKnowledgeBaseElement(booleanFact);
				if (result == null) result = caseRemoObject(booleanFact);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case RemoModelPackage.RULE: {
				Rule rule = (Rule)theEObject;
				T result = caseRule(rule);
				if (result == null) result = caseKnowledgeBaseElement(rule);
				if (result == null) result = caseRemoObject(rule);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case RemoModelPackage.LINKS_FROM_RULES: {
				LinksFromRules linksFromRules = (LinksFromRules)theEObject;
				T result = caseLinksFromRules(linksFromRules);
				if (result == null) result = caseLinkObject(linksFromRules);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case RemoModelPackage.AND_RULE: {
				AndRule andRule = (AndRule)theEObject;
				T result = caseAndRule(andRule);
				if (result == null) result = caseRule(andRule);
				if (result == null) result = caseKnowledgeBaseElement(andRule);
				if (result == null) result = caseRemoObject(andRule);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case RemoModelPackage.OR_RULE: {
				OrRule orRule = (OrRule)theEObject;
				T result = caseOrRule(orRule);
				if (result == null) result = caseRule(orRule);
				if (result == null) result = caseKnowledgeBaseElement(orRule);
				if (result == null) result = caseRemoObject(orRule);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case RemoModelPackage.IMPLICATION: {
				Implication implication = (Implication)theEObject;
				T result = caseImplication(implication);
				if (result == null) result = caseRule(implication);
				if (result == null) result = caseKnowledgeBaseElement(implication);
				if (result == null) result = caseRemoObject(implication);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case RemoModelPackage.LINKS_FROM_FACTS: {
				LinksFromFacts linksFromFacts = (LinksFromFacts)theEObject;
				T result = caseLinksFromFacts(linksFromFacts);
				if (result == null) result = caseLinkObject(linksFromFacts);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case RemoModelPackage.LINK_OBJECT: {
				LinkObject linkObject = (LinkObject)theEObject;
				T result = caseLinkObject(linkObject);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			default: return defaultCase(theEObject);
		}
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Remo Object</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Remo Object</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseRemoObject(RemoObject object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Knowledge Base</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Knowledge Base</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseKnowledgeBase(KnowledgeBase object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Knowledge Base Element</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Knowledge Base Element</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseKnowledgeBaseElement(KnowledgeBaseElement object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Fact</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Fact</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseFact(Fact object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Boolean Fact</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Boolean Fact</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseBooleanFact(BooleanFact object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Rule</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Rule</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseRule(Rule object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Links From Rules</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Links From Rules</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseLinksFromRules(LinksFromRules object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>And Rule</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>And Rule</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseAndRule(AndRule object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Or Rule</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Or Rule</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseOrRule(OrRule object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Implication</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Implication</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseImplication(Implication object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Links From Facts</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Links From Facts</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseLinksFromFacts(LinksFromFacts object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Link Object</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Link Object</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseLinkObject(LinkObject object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch, but this is the last case anyway.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
	 * @generated
	 */
	@Override
	public T defaultCase(EObject object) {
		return null;
	}

} //RemoModelSwitch
